package WangYI;

import java.util.*;
/**
 */
public class Main1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){

            int n = sc.nextInt();
            if(n < 1){
                System.out.println(0);
            }else{
                int[] arr = new int[n];
                for (int i = 0; i < n; i++) {
                    arr[i] = sc.nextInt();
                }
                int res = 0;

                for (int i = 0; i < n; i++) {
                    int temp = arr[i];
                    if(temp==2 || temp==3){
                        res++;
                    }else{
                        int x = temp/2;
                        int y = temp%2;
                        if(y == 0){
                            res = res + x;
                        }else{
                            res = res + x-1+1;
                        }
                    }
                }
                System.out.println(res);
            }
        }
    }
}
